[libc++] Clarify _LIBCPP_NEW_DELETE_VIS for Windows Replace a stale reference to cxx_EXPORTS with _LIBCPP_BUILDING_LIBRARY, and clarify why the operator new and delete family of functions are marked dllexport when building but *not* dllimport when including the header externally. The new code is identical to the intent of the old code (and would be functionally equivalent were cxx_EXPORTS still defined when building libc++). The overall behavior is not ideal, since Microsoft's operator new and delete functions will get called instead of libc++'s, but I think consistently calling msvcrt's functions is better than either calling msvcrt's or libc++'s functions depending on header inclusion. Differential Revision: https://reviews.llvm.org/D25042 git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@282644 91177308-0d34-0410-b5e6-96231b3b80d8 
diff --git a/include/new b/include/new index 936f9ee..16b3011 100644 --- a/include/new +++ b/include/new 
@@ -125,8 +125,8 @@    } // std   -#if defined(_WIN32) && !defined(cxx_EXPORTS) -# define _LIBCPP_NEW_DELETE_VIS _LIBCPP_FUNC_VIS_ONLY +#if defined(_LIBCPP_MSVCRT) && !defined(_LIBCPP_BUILDING_LIBRARY) +# define _LIBCPP_NEW_DELETE_VIS  #else  # define _LIBCPP_NEW_DELETE_VIS _LIBCPP_FUNC_VIS  #endif